From 6321b76c28e7949021f0d219915044b4c88aaa52 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Wed, 28 Mar 2007 13:53:27 +0100 Subject: [PATCH] Remove page_is_removable arch hook. Now the ia64 p2m semantic becomes same as the x86 p2m table so that the hook is unnecessary any more. Signed-off-by: Isaku Yamahata --- xen/common/memory.c | 4 ++-- xen/include/asm-ia64/mm.h | 5 ----- xen/include/asm-powerpc/mm.h | 5 ----- xen/include/asm-x86/mm.h | 5 ----- 4 files changed, 2 insertions(+), 17 deletions(-) diff --git a/xen/common/memory.c b/xen/common/memory.c index edd2ebe8d5..26a2fde5eb 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -173,11 +173,11 @@ int guest_remove_page(struct domain *d, unsigned long gmfn) if ( test_and_clear_bit(_PGC_allocated, &page->count_info) ) put_page(page); - if ( unlikely(!page_is_removable(page)) ) + if ( unlikely((page->count_info & PGC_count_mask) != 1) ) { shadow_drop_references(d, page); /* We'll make this a guest-visible error in future, so take heed! */ - if ( !page_is_removable(page) ) + if ( (page->count_info & PGC_count_mask) != 1 ) gdprintk(XENLOG_INFO, "Dom%d freeing in-use page %lx " "(pseudophys %lx): count=%lx type=%lx\n", d->domain_id, mfn, get_gpfn_from_mfn(mfn), diff --git a/xen/include/asm-ia64/mm.h b/xen/include/asm-ia64/mm.h index 47f0aa49e3..9b4ff9c34d 100644 --- a/xen/include/asm-ia64/mm.h +++ b/xen/include/asm-ia64/mm.h @@ -210,11 +210,6 @@ static inline int get_page_and_type(struct page_info *page, return rc; } -static inline int page_is_removable(struct page_info *page) -{ - return ((page->count_info & PGC_count_mask) == 1); -} - #define set_machinetophys(_mfn, _pfn) do { } while(0); #ifdef MEMORY_GUARD diff --git a/xen/include/asm-powerpc/mm.h b/xen/include/asm-powerpc/mm.h index ed6a10c67b..4eba5249e9 100644 --- a/xen/include/asm-powerpc/mm.h +++ b/xen/include/asm-powerpc/mm.h @@ -204,11 +204,6 @@ static inline int get_page_and_type(struct page_info *page, return rc; } -static inline int page_is_removable(struct page_info *page) -{ - return ((page->count_info & PGC_count_mask) == 1); -} - extern void synchronise_pagetables(unsigned long cpu_mask); /* XXX don't know what this is for */ diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index 225605efd4..970e95695a 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -222,11 +222,6 @@ static inline int get_page_and_type(struct page_info *page, return rc; } -static inline int page_is_removable(struct page_info *page) -{ - return ((page->count_info & PGC_count_mask) == 1); -} - #define ASSERT_PAGE_IS_TYPE(_p, _t) \ ASSERT(((_p)->u.inuse.type_info & PGT_type_mask) == (_t)); \ ASSERT(((_p)->u.inuse.type_info & PGT_count_mask) != 0) -- 2.30.2